package com.shitou.shitousearch.controller;

import com.shitou.shitoucommons.utils.RespBean;
import com.shitou.shitousearch.service.SearchService;
import com.shitou.shitousearch.vo.SearchVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * class detail:
 *
 * @author 石头人
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("/shitousearch/search")
public class ElasticSearchController {

    @Autowired
    private SearchService searchService;

    @ApiOperation("搜索服务api，对商品信息进行检索")
    @RequestMapping("/search")
    public RespBean search(@RequestBody SearchVo searchVo){
        return searchService.search(searchVo);
    }
}
